package com.zjj.learn.designmodel.work.mediator;

public class Tenant extends Person {


    public Tenant(String name) {
        super(name);
    }

    /**
     * 租户发布租房需求
     **/
    @Override
    public void fabuxinxi(String msg) {
        getMediator().needHouse(msg);
    }

    /**
     * 中介者通知租户有房源信息了
     *
     * @param message 房源信息
     **/
    public void contact(String message) {
        System.out.println("中介通知租户，" + getName() + "：" + message);
    }
}
